// 时间添加天数，返回字符串
const addDaysToDate = (data, n) => {
    const d = new Date(data);
    console.log(d);
    // console.log(d.getDate(), d.getHours(), d.getMinutes());
    d.setDate(d.getDate() + n)
    return d.toISOString().split('T')[0]
}
console.log(addDaysToDate('2020-10-15', 10));